package com.yupi.usercenter.exception;

import lombok.Data;

/**
 * 统一异常类
 */
@Data
public class UserCenterException extends RuntimeException {

    private final Integer code;

    private final String message;


    public UserCenterException(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public UserCenterException(UserCenterExceptionEnum exceptionEnum) {
        this(exceptionEnum.getCode(), exceptionEnum.getMsg());
    }


}
